#!/bin/bash
echo "start!"
php yii swoole/stop
dynamic_update=1
if [ ${dynamic_update} -eq 1 ]
then
   java -cp zkclient/zkclient.jar cn.lechange.lczk.ApolloClient host=172.16.0.213:8080 appId=prod-ecparty cluster=default namespace=application src=.env.template dest=.env
else
   echo "needn't update config, start directly..."
fi

php yii swoole/start